package com.mengdie.shuidi.ui.interfaces;

import android.graphics.Bitmap;
import android.widget.ImageView;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.BitmapCallback;
import com.mengdie.shuidi.AppContext;

import okhttp3.Call;
import okhttp3.Response;


/**
 * 作者：HQY on 17/5/27 17:22
 * 邮箱：hqy_xz@126.com
 */
public class VerifyHelper {

    public static void getImgVerify(final ImageView view) {
        OkGo.post(AppContext.getInstance().getBaseUrl() + "account/verify").tag("verify")
                .execute(new BitmapCallback() {
                    @Override
                    public void onSuccess(Bitmap bitmap, Call call, Response response) {
                        view.setImageBitmap(bitmap);
                    }
                });
    }

}
